package com.mars.ticket.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.mars.ticket.entity.ChatRecord;
import com.mars.ticket.request.ChatRecordRequest;
import com.mars.ticket.response.ChatRecordResponse;
import com.mars.ticket.response.UserResponse;
import com.mars.ticket.response.base.PageInfo;

import java.util.List;

/**
 * ChatRecord 接口
 *
 * @Author wq
 * @Date 2021-03-15
 **/
public interface IChatRecordService extends IService<ChatRecord> {


    /**
     * 发送消息
     *
     * @param request request
     */
    void send(ChatRecordRequest request);


    void reply(ChatRecordRequest request);

    /**
     * 接收消息
     *
     * @param request request
     * @return PageInfo<ChatRecord>
     */
    PageInfo<ChatRecordResponse> receive(ChatRecordRequest request);


    void delete(Integer id);


    /**
     * 获取聊天列表
     *
     * @param fromUserId fromUserId
     * @return List<UserResponse>
     */
    List<UserResponse> chatList(Integer fromUserId);
}
